#pragma once
#include "Common/Common.h"
#include "Common/CudaDepends.h"

struct cuVector3r {
	Real x;
	Real y;
	Real z;
};

//vec ans = vec p0 - vec p1
__device__ void vector3r_Subtraction(cuVector3r * p0, cuVector3r * p1, cuVector3r * ans);
__device__ cuVector3r vector3r_Subtraction_np(cuVector3r p0, cuVector3r p1);

// ret = p0.norm
__device__ Real vector3r_norm(cuVector3r * p0);

// p0 = p0.normalize
__device__ Real vector3r_normalize(cuVector3r * p0);

// res = p0 * m
__device__ void vector3r_scalar_multiply(cuVector3r *p0, Real m, cuVector3r *res);

// ret = p0 dot p1
__device__ Real vector3r_dot_multiply(cuVector3r *p0, cuVector3r *p1);